/* GUI CONVERTED from rewoiq5a.p (converter v1.76) Thu Apr 25 19:01:07 2002 */
/* rewoiq5a.p - REPETITIVE (WIP Status Inquiry)                               */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.3.1.3 $                                                       */
/*V8:ConvertMode=Report                                                       */
/* REVISION: 7.3            CREATED: 06/04/96   BY: jym *G1W6*                */
/* REVISION: 8.6      LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan         */
/* REVISION: 9.1      LAST MODIFIED: 11/17/99   BY: *N04H* Vivek Gogte        */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00   BY: *N0KP* Mark Brown         */
/* Old ECO marker removed, but no ECO header exists *F0PN*                    */
/* $Revision: 1.3.1.3 $   BY: Jean Miller        DATE: 04/16/02  ECO: *P05H*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

{mfdeclre.i}

define input  parameter lot like wr_lot no-undo.
define input  parameter op like wr_op no-undo.
define output parameter moved_in like wr_qty_cummove no-undo.
define output parameter first_op like mfc_logical no-undo.

assign
   moved_in = 0
   first_op = true.

find last wr_route where wr_lot = lot and wr_op < op
no-lock no-error.

if available wr_route then
   assign
      moved_in = wr_qty_cummove
      first_op = false.
